// app.js
import errorLogger from './utils/error-logger';

App({
  onLaunch() {
    console.info('小程序启动');

    errorLogger.log({
      type: 'promise',
      error: '测试',
      message: '测试',
      source: 'app.onLaunch'
    });

     // 初始化全局未捕获的Promise错误监听
     wx.onUnhandledRejection(({reason}) => {
      errorLogger.log({
        type: 'promise',
        error: reason,
        message: 'Promise未处理的拒绝',
        source: 'global'
      });
    });

  },
  globalData: {
    userInfo: null
  }
})
